package cn.virens.service.impl.platform.generator;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import cn.virens.database.mysql.mapper.PlatformMapper;
import cn.virens.service.inter.platform.generator.GeneratorDatabaseService;

@Service
public class GeneratorDatabaseServiceImpl implements GeneratorDatabaseService {
	@Value("${generator.db.schema}")
	private String platformSchema;

	private @Autowired PlatformMapper mPlatformMapper;

	@Override
	public List<Map<String, Object>> showTables() {
		return mPlatformMapper.showTables(platformSchema);
	}

	@Override
	public List<Map<String, Object>> showColumns(String table) {
		return mPlatformMapper.showColumns(platformSchema, table);
	}

}
